<?php
class TTF_Form_Company extends Zend_Form
{
	public function init()
	{
		$this->setAction('/admin/gioi-thieu')
				->setMethod('post');
				
		// create hidden input for id
		$id = new Zend_Form_Element_Hidden('id');		
				
		// create text input for name company
		$name = new Zend_Form_Element_Text('name');
		$name->setLabel('Tên công ty:')
				->setOptions(array('size' => '50'))
				->setRequired(true)				
				->addFilter('HtmlEntities')
				->addFilter('StringTrim');
				
		// create text input for address
		$address = new Zend_Form_Element_Text('address');
		$address->setLabel('Địa chỉ công ty:')
				->setOptions(array('size' => '50'))
				->setRequired(true)
				->addFilter('HtmlEntities')
				->addFilter('StringTrim');
				
		// create text input for phone
		$phone = new Zend_Form_Element_Text('phone');
		$phone->setLabel('Số điện thoại liên lạc:')
				->setOptions(array('size' => '50'))								
				->addFilter('HtmlEntities')
				->addFilter('StringTrim');	

		// create text input for description
		$description = new Zend_Form_Element_Textarea('description');
		$description->setLabel('Giới thiệu về công ty:')
					->setOptions(array('rows' => '50', 'cols' => '113'))
					->setRequired(true);
					
		// create submit button
		// create submit button
		$submit = new Zend_Form_Element_Submit('submit');
		$submit->setLabel('Cập nhật')
			->setOptions(array('class' => 'loginbutton'));
			
		// attach elements to form
		$this->addElement($id)		
			->addElement($name)
			->addElement($address)
			->addElement($phone)
			->addElement($description)
			->addElement($submit);
	}
}